from selenium import webdriver
from selenium.webdriver.support import expected_conditions as EC
import time 
import os
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.common.by import By



browser=webdriver.Chrome()

browser.get("http://www.bilibili.com")

element_round=browser.find_element_by_class_name("round")

EC.visibility_of_element_located(element_round)
# 判断某个元素是否可见.可见代表元素非隐藏，并且元素的宽和高都不等于0


WebDriverWait(browser,10).until(EC.presence_of_element_located((By.CLASS_NAME,"element_round")))
# 智能等待10秒钟,直到element_round元素加载完